FROM maven:3-openjdk-17

# 挂载目录
VOLUME /java/
# 创建目录
RUN mkdir -p /java/
# 指定路径
WORKDIR /java/
# 复制jar文件到路径
# COPY ./jar/*.jar /home/ruoyi/ruoyi-admin.jar
# COPY ./jar/ruoyi-admin.jar /home/ruoyi/ruoyi-admin.jar
# 启动应用
# ENTRYPOINT ["java","-jar","jeecg-system-start-3.6.2.jar"]

COPY . .

CMD mvn package && cp -r target/springboot3-api-0.0.1.jar . && java -jar springboot3-api-0.0.1.jar